// inventory.h : contains the definition for the inventory component, which
// allows an object to hold other objects, as well as money :)
//$Id: Inventory.h 41 2009-09-08 20:20:22Z brwarner2 $

#pragma once
#include "component.h"

//Inventory component class
class CInventory :
	public IComponent
{
public:
	//Initialization
	void Init( const ParameterList &params );

	//Messaging function for communication
	void Message( MessageID message, const boost::any& arg = 0 );

	//Handler for GM function calls
	virtual int GMCall( gmThread*, const std::string& name );

	//Game monkey registration function
	static void RegisterGM( gmMachine* );

	//Component ID
	static const ComponentID COMPONENT_ID = 6;

	//Get component ID
	ComponentID GetComponentID(void) { return COMPONENT_ID; }

	//Factory function
	static IComponent* Factory(void) { return new CInventory(); }

	//Destruct function
	static void Destruct( IComponent* pInv ) { delete (pInv); }

private:
	//Amount of money owned by the object
	unsigned int m_nMoney;
};
